/*
   FieldVis - A Tool for Visualizing Astrophysical Magnetohydrodynamic Flow
   
   Copyright (C) 2006 - 2008     FieldVis Development Team
  
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
  
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
  
   You should have received a copy of the GNU General Public License along
   with this program; if not, write to the Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

   File        : UIState.h
   Author      : Jeremy Moc  (mocj@msi.umn.edu)

   Description : Object representing the main client windows UI.
*/
#ifndef UI_STATE_H
#define UI_STATE_H

#include "Point.h"
#include "Vector3D.h"
#include "camera.h"
#include "TextWriter.h"
#include "WindowAttributes.h"
#include "BoundingBox.h"
#include "DisplayMode.h"
#include "SelectionPlane.h"
#include "SelectionCube.h"
#include "Animation.h"


struct UIState
{
   UIState(void *font);
   void SetUpBBoxAndPlane(const float xmax, const float ymax, const float zmax);

   WindowAttributes  *wa;
   TextWriter        *writer;
   BoundingBox       *bBox;
   SelectionPlane    *plane;
   
   Animation      animation;
   SelectionCube  cube;
   DisplayMode    displayMode;
   Vector3D       origin;
   Point          cubeLocation;
   Camera         camera;

   // general flags
   bool orthographic;
   bool movingStreamline;
   bool drawColorMaps;
   bool TexZoomed;

   // keyboard and mouse flags
   bool LeftBtnDown, MidBtnDown, RightBtnDown, ShiftDown;
   
   // mouse position state variables
   int LeftBtnDownX, LeftBtnDownY, MouseLastX, MouseLastY;
   
   // mouse click position trackers (hits)
   int configIndex, tubeIndex, pointIndex;
};

#endif

